var app = angular.module("app", []);

app
    .controller("MC", ["$scope", "$http", function(s) {
        s.somebody = {
            name: "lee",
            age : 28
        };
	}]);

 

app
.controller("OuterController", function($scope) {
    $scope.somebody = {
        name: "haha"
    };
});

app
.directive("helloWorld", function() {
    return {
        restrict: "E",
        //restrict: "EACM",
        // ---------------------------- 
        replace: true,
        transclude: true,
        // --------------------------- 
        scope: {
            somebody: "=somebody"
        },
        
        
       // template: '<div style="color: red; font-size: 40px; font-weight: bold">Ok</div>'
        
        
      
        
        template: 'in son scope: <input ng-model="somebody.name"><p style="background-color:red">{{somebody.name}}</p>'  
    }
});


